import requests

# @app.post("/process_image/")

# process_url = 'http://127.0.0.1:8000/process_image/'
# user_string = 1713251553  # 要传递的用户
#
# response = requests.post(process_url, params={'user_string': user_string})
#
# if response.status_code == 200:
#     print(response.text)
# else:
#     print('Failed to process image')


# @app.post("/upload_image/")

# upload_url = 'http://127.0.0.1:8000/upload_image/'
# image_filename = 'D:\桌面\image_0.png'
# files = {'image': open(image_filename, 'rb')}
# response = requests.post(upload_url, files=files)
# print(response.text)
# if response.status_code == 200:
#     print("upload image sucess")
# else:
#     print('Failed to upload image')


# @app.post("/list_images/")

process_url = 'http://127.0.0.1:8000/list_images/'
user_string = 1713251553  # 要传递的用户

response = requests.get(process_url, params={'user_string': user_string})

if response.status_code == 200:
    print(response.text)
else:
    print('Failed to process image')